import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// ElementPlus组件库: 核心对象，核心CSS，显隐CSS
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import 'element-plus/theme-chalk/display.css';
// ElementPlus图标库 : 导入全部图标
import * as ElementPlusIcons from '@element-plus/icons-vue';
// ElementPlus暗黑模式引入
import 'element-plus/theme-chalk/dark/css-vars.css';

let app = createApp(App);
app.use(store).use(router).use(ElementPlus)
    .mount('#app');

// 全局注册ElementPlus图标库
for (const [key, component] of Object.entries(ElementPlusIcons)) {
    app.component(key, component)
}